﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ThridGroup.ERP.DTO.ProductionSystem;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace ThridGroup.ERP.ProductionSystem
{  
    /// <summary>
    /// 设备台账服务接口
    /// </summary>
    public interface  IDeviceLedgerServices
    {

        /// <summary>
        /// 添加设备台账
        /// </summary>
        /// <param name="createProcedureDto">设备台账信息</param>
        /// <returns>设备台账ID</returns>
        Task<int> AddDeviceLedger(CreateDeviceLedgerDto  createDeviceLedgerDto);

        /// <summary>
        /// 获取设备分类树
        /// </summary>
        /// <returns>设备分类树形结构</returns>
        Task<List<EquipmentTypeTreeDto>> GetEquipmentTypeTreeAsync();

        /// <summary>
        /// 获取设备分类列表
        /// </summary>
        /// <returns>设备分类列表</returns>
        Task<List<EquipmentTypeListDto>> GetEquipmentTypeListAsync();

        /// <summary>
        /// 获取设备台账列表（分页、联表查询）
        /// </summary>
        /// <param name="page">页码</param>
        /// <param name="limit">每页数量</param>
        /// <param name="deviceCode">设备编码（模糊查询）</param>
        /// <param name="deviceName">设备名称（模糊查询）</param>
        /// <param name="equipmentTypeCode">设备分类编码</param>
        /// <returns>分页后的设备台账列表</returns>
        Task<PagedResultDto<DeviceLedgerDtoList>> GetDeviceLedgerList(int page, int limit, string deviceCode = null, string deviceName = null, string equipmentTypeCode = null);

        /// <summary>
        /// 根据ID获取单条设备台账信息（用于编辑反填）
        /// </summary>
        /// <param name="id">设备台账ID</param>
        /// <returns>设备台账详情</returns>
        Task<DeviceLedgerDtoList> GetDeviceLedgerById(int id);

        /// <summary>
        /// 删除设备台账
        /// </summary>
        /// <param name="id">设备台账ID</param>
        /// <returns></returns>
        Task DeleteDeviceLedger(int id);
       /// <summary>
       /// 修改设备台账
       /// </summary>
       /// <param name="id"></param>
       /// <param name="createDeviceLedgerDto"></param>
       /// <returns></returns>
        Task<int>  UpdateDeviceLedger(CreateDeviceLedgerDto createDeviceLedgerDto);
        /// <summary>
        /// 批量删除设备台账
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task BatchDeleteDeviceLedger(int[] ids);



    }
}
